﻿//-------------------------------------------------------------------------
///-----------------videoControl-----------------------------------------------
///-----------------车窗检测及预览管理---------------------------------------------
///-----------------2023/01/02---by mv------------------------------
//-------------------------------------------------------------------------
#pragma once

//-------------------------------------------------------------------------
#ifndef _CLASS_videoControl_H
#define _CLASS_videoControl_H

//--------------------------------------------------------------------------
#include "common/global_include.h"
#include "task/cmd/video_stream/video/video_mgr.h"

//-------------------------------------------------------------------------
namespace mv
{
	//----------------------------------------------------------------------------
	class VideoControlMgr
	{
	public:
		//-------------------------------------------------
		/// 单例模式（Singleton)
		///  1.  _不能使用new创建对象，也不能直接定义类变量
		///  2.  _至少需要提供一个静态的方法，用于返回唯一的对象实例
		//-------------------------------------------------
		static VideoControlMgr* getSingleton();
		static void destroyInstance();

		//-------------------------------------------------
	public:

		//-------------------------------------------------
		// 初始化车窗检测接口
		//-------------------------------------------------
		int initCarWindowInterface(int iDirection);

		//-------------------------------------------------
		// 开始车窗检测
		//-------------------------------------------------
		void startCarWindowProcess();

		//-------------------------------------------------
		// 停止车窗检测
		//-------------------------------------------------
		void stopCarWindowProcess();

		//-------------------------------------------------
		// 虹膜开始预览
		//-------------------------------------------------
		void startIrisCameraPreview();

		//-------------------------------------------------
		// 虹膜停止预览
		//-------------------------------------------------
		void stopIrisCameraPreview();

	private:
		//-------------------------------------------------
		VideoControlMgr();
		VideoControlMgr(const VideoControlMgr&);
	private:
		//-------------------------------------------------
		static VideoControlMgr* _VideoControlMgr;//对外实例
		VideoMgr* _videoMgr;							//视频预览以及车窗检测实例
		
		ThreadPool* m_threadPoor;				         //线程池
		//-------------------------------------------------
	};

	//----------------------------------------------
}

//---------------------------------------------------------------------------
#endif //!_CLASS_videoControl_H
